<?php
/**
 * Created by PhpStorm.
 * User: Keter
 * Date: 2016/8/9
 * Time: 10:41
 */
class GetContents extends Base
{
    /**
     * 远程获取内容
     * 有$data参数则POST发送
     * @param $uri
     * @param array $data
     * @return bool|string
     */
    public static function remote($uri, $data = array())
    {
        $content = '';

        if (function_exists('file_get_contents')) {
            $content = file_get_contents($uri);
        }

        return $content;
    }
}